Subject: Re: Making a helix..
From: [email-masked] (robert hood)
To: [email-masked]
Date: Thu, 29 Feb 1996 13:58:52 -0800

> 
> I just did this while making a spiral staircase (you can see it 
> at the URL in my sig)
> 
> Here's how ...
> 
> 1) make a single point (not a polygon) at 0,0,0
> 
> 2) clone the point - i.e. 11 clones, 30 degree rotation around 
> the Y, 10cm offset in the Y. This will give you a set of 12 
> points in a helix (1 rotation).
> 
> 3) select the points in order, and hit 'p' to make a path.
>
>
> 4) put the helix in a background layer and use for a rail
> extrude of a disc (or whatever).
>

Gabe, just for grins I decided to convert your instructions into a BML
script.  Took me about two minutes to write:

----------------------------------------------------------------------------
// Create a Helix Coil curve in layer #2, and railclone() an object in
// layer #1 along it.  Place your object in layer #1, rotated appropriately,
// with it's center placed on the location of the first point created (i.e.,
// <.5,0,0>).
//
// A better script would calculate that object center point, and use it as
// starting point of the Helix Coil.
//                                                    02.29.96
//                                                    Bob Hood

main
{
    var SEGMENTS = 12;      // twelve points
    var p[SEGMENTS];
    var x,y,l,radius,torad,degrees,radians;

    // some requester code would be nice here to get
    // user parameters (radius, segments, etc.)

    setlayer(2);    // this should be re-written to *look* for an empty layer

    editbegin();

    l = <.5,0,0>;   // start half a meter down the X axis
    p[1] = addpoint(l);

    radius = sqrt((l.x * l.x) + (l.z * l.z));
    degrees = 30;

    for(x = 2;x <= SEGMENTS;x++)
    {
        l.y += .1;      // 10 cm == .1 meter

        l.x = radius * cos(rad(degrees));
        l.z = radius * sin(rad(degrees));

        p[x] = addpoint(l);

        degrees += 30;
    }

    addcurve(p);

    editend();

    setlayer(1);        // again, assumptions being made about the state
    setblayer(2);       // of layers that probably shouldn't be

    railclone(SEGMENTS,KNOTS,"o");  // "o"riented
}
----------------------------------------------------------------------------

Damn I love BML, even if I did write it.  =|^)

Render me gone,               |||
Bob                         ^(===)^
-------------------------oOO--(_)--OOo--------------------------------------
Bob Hood, President | All governments suffer from a recurring problem:
Virtual Visions,Inc.| Power attracts pathological personalities.  It is not
Tel: 1.303.989.4191 | that power corrupts, but that it is magnetic to the
FAX: 1.303.727.7555 | corruptible.  Such people have a tendency to become
                    | drunk on violence, a condition to which they are
[email-masked]    | quickly addicted              - Frank Herbert
----------------------------------------------------------------------------